//零售价小数位数不能多于1位
/**
 *      除称重商品：100元以下零售价格不能带除0.99的其他分位；
 */
var result_Mantissa99_1 = JSON.parse('{"CODE":0, "ACTION":"","LEVEL":"", "MSG":"","DATA":"","RULE":"Mantissa99_1"}');

 if (!isNull(NEW_RETAIL) && !isWeighingItem(PACKAGE_CODE,DEPT_NBR)) {
    //价格小于等于100
    // •	当小数点后第一位为9，提醒：建议价格尾数调整为0.99；第一位小数为1-8时，不做提醒；
    // •	当为整数，提醒：建议价格尾数调整为0.99；
    if (NEW_RETAIL <= 100) {
        if (isSpecificDecimalPlaceEqualTo(NEW_RETAIL, 1, 9) && !isDecimalPartEqualTo(NEW_RETAIL, 0.99)) {
            result_Mantissa99_1.CODE = 1;
            result_Mantissa99_1.ACTION = "OTHER_REMINDS";
            result_Mantissa99_1.MSG = "建议价格尾数调整为0.99";
            result_Mantissa99_1.COLOR = "#519d4e";
            result_Mantissa99_1.BORDER_COLOR = "#cbdfc1";
            result_Mantissa99_1.BACKGROUND_COLOR = "#f0f9eb";
        } else if (isDecimalPartEqualTo(NEW_RETAIL, 0)) {
            result_Mantissa99_1.CODE = 1;
            result_Mantissa99_1.ACTION = "OTHER_REMINDS";
            result_Mantissa99_1.MSG = "建议价格尾数调整为0.99";
            result_Mantissa99_1.COLOR = "#519d4e";
            result_Mantissa99_1.BORDER_COLOR = "#cbdfc1";
            result_Mantissa99_1.BACKGROUND_COLOR = "#f0f9eb";
        }
    //价格100.1-1000时，当小数点第一位不为9时，提醒：建议价格尾数调整为0.9；零售价最多只允许保留一位小数，否则报错：零售价小数位数不能多于1位
    } else if (NEW_RETAIL >= 100.1 && NEW_RETAIL <= 1000) {
        if (!isSpecificDecimalPlaceEqualTo(NEW_RETAIL, 1, 9)) {
            result_Mantissa99_1.CODE = 1;
            result_Mantissa99_1.ACTION = "OTHER_REMINDS";
            result_Mantissa99_1.MSG = "建议价格尾数调整为0.9";
            result_Mantissa99_1.COLOR = "#519d4e";
            result_Mantissa99_1.BORDER_COLOR = "#cbdfc1";
            result_Mantissa99_1.BACKGROUND_COLOR = "#f0f9eb";
        }
        // if (countDecimals(NEW_RETAIL) > 1) {
        //     result_Mantissa99_1.CODE = 2;
        //     result_Mantissa99_1.ACTION = "CHECKING_REPORT";
        //     result_Mantissa99_1.MSG = "零售价小数位数不能多于1位";
        // }
    // 1000以上，当价格不为整数时，提醒：建议零售价为整数；零售价最多只允许保留一位小数，否则报错：零售价小数位数不能多于1位
    } else if (NEW_RETAIL > 1000) {
        if (!isDecimalPartEqualTo(NEW_RETAIL, 0)) {
            result_Mantissa99_1.CODE = 1;
            result_Mantissa99_1.ACTION = "OTHER_REMINDS";
            result_Mantissa99_1.MSG = "建议零售价为整数";
            result_Mantissa99_1.COLOR = "#519d4e";
            result_Mantissa99_1.BORDER_COLOR = "#cbdfc1";
            result_Mantissa99_1.BACKGROUND_COLOR = "#f0f9eb";
        }
        // if (countDecimals(NEW_RETAIL) > 1) {
        //     result_Mantissa99_1.CODE = 2;
        //     result_Mantissa99_1.ACTION = "CHECKING_REPORT";
        //     result_Mantissa99_1.MSG = "零售价小数位数不能多于1位";
        // }
    }
}
JSON.stringify(result_Mantissa99_1);